#include "gameengine.h"

#include <fstream>
#include <iostream>

int main()
{
#ifndef NOLOG
    // Redirection de std::cout vers le fichier log.txt
    std::ofstream Out("log.txt");
    std::cout.rdbuf(Out.rdbuf());
//    std::streambuf* OldBuf = std::cout.rdbuf(Out.rdbuf());

//    // Restauration du streambuf initial de std::cout (affichage sur la console)
//    std::cout.rdbuf(OldBuf);
#endif

    CGameEngine engine;

	engine.Init();

	engine.Start();

	engine.End();

	return EXIT_SUCCESS;
}
